package net.csdra.article.domain.meta;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.UUID;

/**
 * Created by msf on 2018/2/2.
 */
@Entity
public class TimeMeta implements MetaBase {
    @Id
    String id;
    private String typeId;
    private boolean required;
    private String name;
    private Time value;

    private String regexPattern;

    /**
     * @param name
     * @param regexPattern
     */
    public TimeMeta(String name, String regexPattern) {
        this.typeId = "time";
        this.name = name;
        this.regexPattern = regexPattern;
    }

    @Override
    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTypeId() {
        return typeId;
    }


    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Time getValue() {
        return value;
    }

    public void setValue(Time value) {
        this.value = value;
    }

    public String getRegexPattern() {
        return regexPattern;
    }

    public void setRegexPattern(String regexPattern) {
        this.regexPattern = regexPattern;
    }
}
